function format_data_{$name}(val){

var data = new Object();
<volist name="list" id="vo">
    data['{$vo[$keyField]}'] = '{$vo[$valField]}';<php>echo "\r\n";</php>
</volist>

if(typeof val == 'undefined' || val == null || val == 0) return '';

var vals = (val+'').split(',');
var str = '';
for(var i=0;i<vals.length;i++){
    str += ',' +data[vals[i]];
}

return str.length > 0 ? str.substring(1) : '';

}